﻿@model MvcAtletIS.Models.Competitions

@{
    ViewBag.Title = "Preteky";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Editovať preteky</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Detaily</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.City)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.City)
            @Html.ValidationMessageFor(model => model.City)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Organiser)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Organiser)
            @Html.ValidationMessageFor(model => model.Organiser)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateFrom)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateFrom)
            @Html.ValidationMessageFor(model => model.DateFrom)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateTo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateTo)
            @Html.ValidationMessageFor(model => model.DateTo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Deadline)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Deadline)
            @Html.ValidationMessageFor(model => model.Deadline)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ClubsCountries)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ClubsCountries)
            @Html.ValidationMessageFor(model => model.ClubsCountries)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Lanes)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Lanes)
            @Html.ValidationMessageFor(model => model.Lanes)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LanesQuality)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LanesQuality)
            @Html.ValidationMessageFor(model => model.LanesQuality)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Active)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Active)
            @Html.ValidationMessageFor(model => model.Active)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sync)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sync)
            @Html.ValidationMessageFor(model => model.Sync)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Public)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Public)
            @Html.ValidationMessageFor(model => model.Public)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.External)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.External)
            @Html.ValidationMessageFor(model => model.External)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Website)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Website)
            @Html.ValidationMessageFor(model => model.Website)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PreAttachments)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PreAttachments)
            @Html.ValidationMessageFor(model => model.PreAttachments)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PostAttachments)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PostAttachments)
            @Html.ValidationMessageFor(model => model.PostAttachments)
        </div>

        <p>
            Dokumenty uložte do zložky [../Results/rok/mesiac]
        </p>

        <p>
            <input type="submit" value="Uložiť" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Naspäť na prehľad pretekov", "Index")
</div>
